﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Schism.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Schism
{
    public static class TileBank
    {
        private static Dictionary<int, Texture2D> _TileBank;
        public static Texture2D GetTile(int index)
        {
            return _TileBank[index];
        }

        static TileBank()
        {
            _TileBank = new Dictionary<int, Texture2D>();

            _TileBank.Add((int)CellConverterEnum.Open, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(000, 000, 64, 64)));
            _TileBank.Add((int)CellConverterEnum.Closed, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(064, 000, 64, 64)));
            _TileBank.Add((int)CellConverterEnum.Stone, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(128, 000, 64, 64)));

            _TileBank.Add((int)CellConverterEnum.Gold, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(000, 064, 64, 64)));
            _TileBank.Add((int)CellConverterEnum.Water, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(064, 064, 64, 64)));
            _TileBank.Add(6, SpriteSheetHelper.Retreive(ResourceBank.Get<Texture2D>("dungeonsheet1"), new Rectangle(128, 064, 64, 64))); 
        }
    }
}
